package com.bigshen.demo.annotation.configurecomponents.a4Conditional;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MyTest {

    @Test
    public void test() {

        // 启动参数配置，将环境变为Linux  -Dos.name=Linux

        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(MyConfig.class);

        System.out.println(applicationContext.getBeanDefinitionNames());

    }

}
